.class Lcom/htc/android/footprints/utils/TitleGenerator$1;
.super Ljava/lang/Object;
.source "TitleGenerator.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/htc/android/footprints/utils/TitleGenerator;->searchFromGgeocoder()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/htc/android/footprints/utils/TitleGenerator;


# direct methods
.method constructor <init>(Lcom/htc/android/footprints/utils/TitleGenerator;)V
    .locals 0
    .parameter

    .prologue
    .line 139
    iput-object p1, p0, Lcom/htc/android/footprints/utils/TitleGenerator$1;->this$0:Lcom/htc/android/footprints/utils/TitleGenerator;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 14

    .prologue
    const/4 v1, 0x1

    const/4 v10, 0x0

    const-string v13, "map"

    const-string v12, "gps"

    const-string v11, "TitleGenerator"

    .line 140
    const/4 v6, 0x3

    .line 141
    .local v6, MAX_TRY:I
    const/4 v8, 0x0

    .line 143
    .local v8, result:Z
    const/4 v7, 0x0

    .local v7, count:I
    :goto_0
    if-ge v7, v6, :cond_0

    .line 144
    invoke-static {}, Lcom/htc/android/footprints/utils/TitleGenerator;->access$000()Z

    move-result v0

    if-eqz v0, :cond_3

    .line 145
    invoke-static {v10}, Lcom/htc/android/footprints/utils/TitleGenerator;->access$002(Z)Z

    .line 154
    :cond_0
    if-eqz v8, :cond_5

    .line 155
    iget-object v0, p0, Lcom/htc/android/footprints/utils/TitleGenerator$1;->this$0:Lcom/htc/android/footprints/utils/TitleGenerator;

    #getter for: Lcom/htc/android/footprints/utils/TitleGenerator;->mListener:Lcom/htc/android/footprints/utils/TitleGenerator$SearchListener;
    invoke-static {v0}, Lcom/htc/android/footprints/utils/TitleGenerator;->access$200(Lcom/htc/android/footprints/utils/TitleGenerator;)Lcom/htc/android/footprints/utils/TitleGenerator$SearchListener;

    move-result-object v0

    if-eqz v0, :cond_2

    .line 156
    iget-object v0, p0, Lcom/htc/android/footprints/utils/TitleGenerator$1;->this$0:Lcom/htc/android/footprints/utils/TitleGenerator;

    #getter for: Lcom/htc/android/footprints/utils/TitleGenerator;->mTargetLocation:Landroid/location/Location;
    invoke-static {v0}, Lcom/htc/android/footprints/utils/TitleGenerator;->access$300(Lcom/htc/android/footprints/utils/TitleGenerator;)Landroid/location/Location;

    move-result-object v0

    invoke-virtual {v0}, Landroid/location/Location;->getProvider()Ljava/lang/String;

    move-result-object v9

    .line 157
    .local v9, source:Ljava/lang/String;
    iget-object v0, p0, Lcom/htc/android/footprints/utils/TitleGenerator$1;->this$0:Lcom/htc/android/footprints/utils/TitleGenerator;

    #getter for: Lcom/htc/android/footprints/utils/TitleGenerator;->mListener:Lcom/htc/android/footprints/utils/TitleGenerator$SearchListener;
    invoke-static {v0}, Lcom/htc/android/footprints/utils/TitleGenerator;->access$200(Lcom/htc/android/footprints/utils/TitleGenerator;)Lcom/htc/android/footprints/utils/TitleGenerator$SearchListener;

    move-result-object v0

    invoke-static {}, Lcom/htc/android/footprints/utils/TitleGenerator;->access$400()Ljava/lang/String;

    move-result-object v2

    invoke-static {}, Lcom/htc/android/footprints/utils/TitleGenerator;->access$500()Ljava/lang/String;

    move-result-object v3

    iget-object v4, p0, Lcom/htc/android/footprints/utils/TitleGenerator$1;->this$0:Lcom/htc/android/footprints/utils/TitleGenerator;

    #getter for: Lcom/htc/android/footprints/utils/TitleGenerator;->mAddress:Landroid/location/Address;
    invoke-static {v4}, Lcom/htc/android/footprints/utils/TitleGenerator;->access$600(Lcom/htc/android/footprints/utils/TitleGenerator;)Landroid/location/Address;

    move-result-object v4

    const-string v5, "gps"

    invoke-virtual {v9, v12}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v5

    if-nez v5, :cond_1

    const-string v5, "map"

    invoke-virtual {v9, v13}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_4

    :cond_1
    move v5, v1

    :goto_1
    invoke-interface/range {v0 .. v5}, Lcom/htc/android/footprints/utils/TitleGenerator$SearchListener;->onResult(ZLjava/lang/String;Ljava/lang/String;Landroid/location/Address;Z)V

    .line 162
    .end local v9           #source:Ljava/lang/String;
    :cond_2
    const-string v0, "TitleGenerator"

    const-string v0, "Geocoder succeed !"

    invoke-static {v11, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 174
    :goto_2
    return-void

    .line 149
    :cond_3
    iget-object v0, p0, Lcom/htc/android/footprints/utils/TitleGenerator$1;->this$0:Lcom/htc/android/footprints/utils/TitleGenerator;

    #calls: Lcom/htc/android/footprints/utils/TitleGenerator;->startGeocoding()Z
    invoke-static {v0}, Lcom/htc/android/footprints/utils/TitleGenerator;->access$100(Lcom/htc/android/footprints/utils/TitleGenerator;)Z

    move-result v8

    .line 150
    if-nez v8, :cond_0

    .line 143
    add-int/lit8 v7, v7, 0x1

    goto :goto_0

    .restart local v9       #source:Ljava/lang/String;
    :cond_4
    move v5, v10

    .line 157
    goto :goto_1

    .line 164
    .end local v9           #source:Ljava/lang/String;
    :cond_5
    iget-object v0, p0, Lcom/htc/android/footprints/utils/TitleGenerator$1;->this$0:Lcom/htc/android/footprints/utils/TitleGenerator;

    #getter for: Lcom/htc/android/footprints/utils/TitleGenerator;->mListener:Lcom/htc/android/footprints/utils/TitleGenerator$SearchListener;
    invoke-static {v0}, Lcom/htc/android/footprints/utils/TitleGenerator;->access$200(Lcom/htc/android/footprints/utils/TitleGenerator;)Lcom/htc/android/footprints/utils/TitleGenerator$SearchListener;

    move-result-object v0

    if-eqz v0, :cond_7

    .line 165
    iget-object v0, p0, Lcom/htc/android/footprints/utils/TitleGenerator$1;->this$0:Lcom/htc/android/footprints/utils/TitleGenerator;

    #getter for: Lcom/htc/android/footprints/utils/TitleGenerator;->mTargetLocation:Landroid/location/Location;
    invoke-static {v0}, Lcom/htc/android/footprints/utils/TitleGenerator;->access$300(Lcom/htc/android/footprints/utils/TitleGenerator;)Landroid/location/Location;

    move-result-object v0

    invoke-virtual {v0}, Landroid/location/Location;->getProvider()Ljava/lang/String;

    move-result-object v9

    .line 166
    .restart local v9       #source:Ljava/lang/String;
    iget-object v0, p0, Lcom/htc/android/footprints/utils/TitleGenerator$1;->this$0:Lcom/htc/android/footprints/utils/TitleGenerator;

    #getter for: Lcom/htc/android/footprints/utils/TitleGenerator;->mListener:Lcom/htc/android/footprints/utils/TitleGenerator$SearchListener;
    invoke-static {v0}, Lcom/htc/android/footprints/utils/TitleGenerator;->access$200(Lcom/htc/android/footprints/utils/TitleGenerator;)Lcom/htc/android/footprints/utils/TitleGenerator$SearchListener;

    move-result-object v0

    invoke-static {}, Lcom/htc/android/footprints/utils/TitleGenerator;->access$400()Ljava/lang/String;

    move-result-object v2

    invoke-static {}, Lcom/htc/android/footprints/utils/TitleGenerator;->access$500()Ljava/lang/String;

    move-result-object v3

    iget-object v4, p0, Lcom/htc/android/footprints/utils/TitleGenerator$1;->this$0:Lcom/htc/android/footprints/utils/TitleGenerator;

    #getter for: Lcom/htc/android/footprints/utils/TitleGenerator;->mAddress:Landroid/location/Address;
    invoke-static {v4}, Lcom/htc/android/footprints/utils/TitleGenerator;->access$600(Lcom/htc/android/footprints/utils/TitleGenerator;)Landroid/location/Address;

    move-result-object v4

    const-string v5, "gps"

    invoke-virtual {v9, v12}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v5

    if-nez v5, :cond_6

    const-string v5, "map"

    invoke-virtual {v9, v13}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_8

    :cond_6
    move v5, v1

    :goto_3
    move v1, v10

    invoke-interface/range {v0 .. v5}, Lcom/htc/android/footprints/utils/TitleGenerator$SearchListener;->onResult(ZLjava/lang/String;Ljava/lang/String;Landroid/location/Address;Z)V

    .line 172
    .end local v9           #source:Ljava/lang/String;
    :cond_7
    const-string v0, "TitleGenerator"

    const-string v0, "Geocoder fail !"

    invoke-static {v11, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_2

    .restart local v9       #source:Ljava/lang/String;
    :cond_8
    move v5, v10

    .line 166
    goto :goto_3
.end method
